Tweak coldsync's hardcoded config.h pathname. Changes to configure.in
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 9 Apr 2006 02:11:34 +0000 (02:11 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 9 Apr 2006 02:11:34 +0000 (02:11 +0000)
and Makefile to never look for libusb on Windows.

gpsbabel/Makefile
gpsbabel/Makefile.in
gpsbabel/coldsync/config.h [deleted file]
gpsbabel/coldsync/cs-config.h [new file with mode: 0644]
gpsbabel/coldsync/pdb.c
gpsbabel/coldsync/util.c
gpsbabel/configure
gpsbabel/configure.in
gpsbabel/jeeps/gpslibusb.c

index 86f7e9a1648cf7af27e8374abe85828ab89b7857..dc67d4b249728c6aebf3dd68b729d7e9f533e307 100644 (file)
@@ -1,8 +1,9 @@
 
+
 VERSU=1_2_8
 VERSD=1.2.8
 # YYYYMMDD, please, if beta.
-RELEASE=-beta20060219
+RELEASE=-beta20060405
 VERSIONU=$(VERSU)$(RELEASE)
 VERSIOND=$(VERSD)$(RELEASE)
 
@@ -13,12 +14,7 @@ VERSIOND=$(VERSD)$(RELEASE)
 # type that is XML-ish (i.e. gpx or geocaching.com's/loc) you can uncomment
 # INHIBIT_EXPAT and coment out LIBEXPAT on just to get a build working quickly.
 # INHIBIT_EXPAT=-DNO_EXPAT
-LIBEXPAT=-lexpat # -lefence
-
-# USB may required non-standard libraries (like libusb) be installed
-# and may not be available on all OSes.  Uncomment this to remove the key
-# parts of USB from the build.
-LIBUSB=-lusb
+LIBEXPAT= -L/usr/lib -lusb -lexpat  # -lefence
 
 # Space is significant, because MSVC wants no space between switch and arg (-Fofoo.o)
 # but cc/gcc does:
@@ -33,11 +29,12 @@ OUTPUT_SWITCH=-o #
 OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
 DEBUGGING=-g $(EXTRA_DEBUGGING)
 # add -DDEBUG_MEM to turn on memory allocation logging
-CFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -Icoldsync $(INHIBIT_EXPAT) $(INHIBIT_USB) $(OPTIMIZATION)
+GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I./coldsync \
+       $(INHIBIT_USB) $(OPTIMIZATION) -g -O2
 INSTALL_TARGETDIR=/usr/local/
 
-#OTHER_ROOT=/opt/local # For DarwinPorts on OSX
-OTHER_ROOT=/sw         # Uncomment For Fink on OS X.
+# OTHER_ROOT=/opt/local        # For DarwinPorts on OSX
+# OTHER_ROOT=/sw               # Uncomment For Fink on OS X.
 
 FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
        gtm.o \
@@ -56,12 +53,12 @@ FILTERS=position.o duplicate.o arcdist.o polygon.o smplrout.o \
        reverse_route.o sort.o stackfilter.o trackfilter.o discard.o \
        nukedata.o interpolate.o
 
-OSJEEPS=jeeps/gpslibusb.o
 JEEPS=jeeps/gpsapp.o jeeps/gpscom.o \
        jeeps/gpsmath.o jeeps/gpsmem.o  \
        jeeps/gpsprot.o jeeps/gpsread.o \
        jeeps/gpsrqst.o jeeps/gpssend.o jeeps/gpsserial.o jeeps/gpsutil.o \
-       jeeps/gpsusbread.o jeeps/gpsusbsend.o jeeps/gpsusbstub.o $(OSJEEPS)
+       jeeps/gpsusbread.o jeeps/gpsusbsend.o jeeps/gpslibusb.o
+
 # Extra modules in Jeeps that we don't use
 #      jeeps/gpsfmt.o jeeps/gpsinput.o jeeps/gpsproj.o
 
@@ -78,26 +75,24 @@ LIBOBJS = queue.o route.o waypt.o filter_vecs.o util.o vecs.o mkshort.o \
 OBJS = main.o globals.o $(LIBOBJS)
 
 .c.o:
-       $(CC) -c $(CFLAGS) $< $(OUTPUT_SWITCH)$@
+       gcc  -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
+
+
 
 # Directory of web doc 
 WEB=../babelweb/
 
 
-all: gpsbabel
-
-#
-# Alternate makefile target for the case when you have no libusb and no 
-# need for Garmin/USB (60, 76C, VistaC, Quest, etc.) support.
-#
-usbfree:
-       make LIBUSB= INHIBIT_USB=-DNO_USB
+all: gpsbabel$(EXEEXT)
 
-gpsbabel: $(OBJS)
-       $(CC) $(CFLAGS) $(OBJS) $(LIBEXPAT) $(LIBUSB) -lm $(OUTPUT_SWITCH)$@
+gpsbabel$(EXEEXT): $(OBJS)
+       gcc  $(CFLAGS) $(OBJS) -lm  -L/usr/lib -lusb $(LIBEXPAT) $(OUTPUT_SWITCH)$@
 
 globals.o:
-       $(CC) -c $(CFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+       gcc  -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+
+jeeps/gpslibusb.o: 
+       gcc  -c $(GBCFLAGS)  jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
 
 clean:
        rm -f $(OBJS) gpsbabel gpsbabel.exe
@@ -135,9 +130,13 @@ dep:
 # Requires CLASSPATH be exported to include full path to saxon.jar.
 # (typically /usr/share/java on a Linux system.)
 readme.html: readme.xml 
-       java  com.icl.saxon.StyleSheet $< \
-       /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
-       html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
+       xsltproc --stringparam html.stylesheet \
+         "http://www.gpsbabel.org/style3.css" \
+         http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+         $< > $@ || rm $@
+#      java  com.icl.saxon.StyleSheet $< \
+#      /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
+#      html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
        cp readme.html $(WEB)/readme.xhtml
        tools/mkcapabilities
 
@@ -167,12 +166,6 @@ rpmrelease:
        curl -u anonymous:anonymous --upload-file /usr/src/redhat/SRPMS/gpsbabel-$(VERSIOND).src.rpm  ftp://upload.sf.net/incoming/ 
        curl -u anonymous:anonymous --upload-file /usr/src/redhat/RPMS/i386/gpsbabel-$(VERSIOND).i386.rpm  ftp://upload.sf.net/incoming/ 
 
-mac-usbfree:
-       make LIBEXPAT=$(OTHER_ROOT)/lib/libexpat.a EXTRA_CFLAGS="-I$(OTHER_ROOT)/include" LIBUSB= INHIBIT_USB=-DNO_USB
-
-mac-build:
-       make LIBEXPAT=$(OTHER_ROOT)/lib/libexpat.a EXTRA_CFLAGS="-I$(OTHER_ROOT)/include" LIBUSB="$(OTHER_ROOT)/lib/libusb.a -lIOKit  -lBSDPClient -framework CoreFoundation"
-
 mac-release:
        mkdir -p usr/bin usr/share/gpsbabel/doc
        cp gpsbabel usr/bin/
@@ -246,7 +239,7 @@ duplicate.o: duplicate.c defs.h queue.h gbtypes.h cet.h cet_util.h \
 easygps.o: easygps.c defs.h queue.h gbtypes.h cet.h cet_util.h
 fatal.o: fatal.c defs.h queue.h gbtypes.h cet.h cet_util.h
 filter_vecs.o: filter_vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h \
-  filterdefs.h inifile.h
+  filterdefs.h
 formspec.o: formspec.c defs.h queue.h gbtypes.h cet.h cet_util.h
 garmin.o: garmin.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gps.h \
   jeeps/../defs.h jeeps/gpsport.h jeeps/gpsserial.h jeeps/gps.h \
@@ -254,10 +247,7 @@ garmin.o: garmin.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gps.h \
   jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
   jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h \
   garmin_tables.h
-garmin_fs.o: garmin_fs.c garmin_fs.h defs.h garmin_tables.h inifile.h
-garmin_tables.o: garmin_tables.c garmin_tables.h defs.h
-garmin_txt.o: garmin_txt.c defs.h strptime.h cet_util.h csv_util.h \
-  garmin_fs.h inifile.h jeeps/gpsmath.h garmin_tables.h grtcirc.h
+garmin_tables.o: garmin_tables.c garmin_tables.h
 gcdb.o: gcdb.c defs.h queue.h gbtypes.h cet.h cet_util.h coldsync/palm.h \
   coldsync/../gbtypes.h coldsync/pdb.h
 gdb.o: gdb.c defs.h queue.h gbtypes.h cet.h cet_util.h garmin_tables.h \
@@ -283,8 +273,7 @@ gpilots.o: gpilots.c defs.h queue.h gbtypes.h cet.h cet_util.h \
 gpspilot.o: gpspilot.c defs.h queue.h gbtypes.h cet.h cet_util.h \
   coldsync/palm.h coldsync/../gbtypes.h coldsync/pdb.h
 gpsutil.o: gpsutil.c defs.h queue.h gbtypes.h cet.h cet_util.h magellan.h
-gpx.o: gpx.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h \
-  garmin_fs.h
+gpx.o: gpx.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h
 grtcirc.o: grtcirc.c defs.h queue.h gbtypes.h cet.h cet_util.h
 gtm.o: gtm.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gpsmath.h \
   jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h jeeps/gpsserial.h \
@@ -322,7 +311,7 @@ magnav.o: magnav.c defs.h queue.h gbtypes.h cet.h cet_util.h \
   coldsync/palm.h coldsync/../gbtypes.h coldsync/pdb.h
 magproto.o: magproto.c defs.h queue.h gbtypes.h cet.h cet_util.h \
   magellan.h
-main.o: main.c defs.h queue.h gbtypes.h cet.h cet_util.h filterdefs.h inifile.h
+main.o: main.c defs.h queue.h gbtypes.h cet.h cet_util.h filterdefs.h
 mapsend.o: mapsend.c defs.h queue.h gbtypes.h cet.h cet_util.h mapsend.h \
   magellan.h
 mapsource.o: mapsource.c defs.h queue.h gbtypes.h cet.h cet_util.h \
@@ -407,7 +396,7 @@ vcf.o: vcf.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gpsmath.h \
   jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h \
   jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
   jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h
-vecs.o: vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h csv_util.h inifile.h
+vecs.o: vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h csv_util.h
 vitosmt.o: vitosmt.c defs.h queue.h gbtypes.h cet.h cet_util.h
 vmem.o: vmem.c defs.h queue.h gbtypes.h cet.h cet_util.h
 waypt.o: waypt.c defs.h queue.h gbtypes.h cet.h cet_util.h
index 6d7678e588cd7607848534de7f9774e0ce2b5cf4..6f9cbc6fbba8eb8a05d934886a698b7b93a70ea9 100644 (file)
@@ -29,7 +29,7 @@ OUTPUT_SWITCH=-o #
 OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
 DEBUGGING=-g $(EXTRA_DEBUGGING)
 # add -DDEBUG_MEM to turn on memory allocation logging
-GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I@srcdir@/coldsync \
+GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I@srcdir@/coldsync \
        $(INHIBIT_USB) $(OPTIMIZATION) @CFLAGS@
 INSTALL_TARGETDIR=/usr/local/
 
@@ -75,7 +75,7 @@ LIBOBJS = queue.o route.o waypt.o filter_vecs.o util.o vecs.o mkshort.o \
 OBJS = main.o globals.o $(LIBOBJS)
 
 .c.o:
-       @CC@  -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
+       @CC@  @CPPFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
 
 
 
@@ -83,16 +83,16 @@ OBJS = main.o globals.o $(LIBOBJS)
 WEB=../babelweb/
 
 
-all: gpsbabel
+all: gpsbabel@EXEEXT@
 
-gpsbabel: $(OBJS)
+gpsbabel@EXEEXT@: $(OBJS)
        @CC@  $(CFLAGS) $(OBJS) @LIBS@ @USB_LIBS@ $(LIBEXPAT) $(OUTPUT_SWITCH)$@
 
 globals.o:
-       @CC@  -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+       @CC@  @CPPFLAGS@ -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
 
 jeeps/gpslibusb.o: 
-       @CC@  -c $(GBCFLAGS) @USB_CFLAGS@ jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
+       @CC@  @CPPFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
 
 clean:
        rm -f $(OBJS) gpsbabel gpsbabel.exe
@@ -123,20 +123,11 @@ dep:
        (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)' ) >> /tmp/dep
        echo Edit Makefile and bring in /tmp/dep
 
-# Doc targets have large external requirements.
-# Requires saxon6, not saxon8.  Saxon requires Java.
-# Requires hardcoded pathnames to installed docbook both in the 
-# source file and on this command like.  (Ick.)
-# Requires CLASSPATH be exported to include full path to saxon.jar.
-# (typically /usr/share/java on a Linux system.)
 readme.html: readme.xml 
        xsltproc --stringparam html.stylesheet \
          "http://www.gpsbabel.org/style3.css" \
          http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
          $< > $@ || rm $@
-#      java  com.icl.saxon.StyleSheet $< \
-#      /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
-#      html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
        cp readme.html $(WEB)/readme.xhtml
        tools/mkcapabilities
 
@@ -407,9 +398,9 @@ xmlgeneric.o: xmlgeneric.c defs.h queue.h gbtypes.h cet.h cet_util.h \
   xmlgeneric.h
 xmltag.o: xmltag.c defs.h queue.h gbtypes.h cet.h cet_util.h
 yahoo.o: yahoo.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h
-coldsync/pdb.o: coldsync/pdb.c coldsync/config.h coldsync/palm.h \
+coldsync/pdb.o: coldsync/pdb.c coldsync/cs-config.h coldsync/palm.h \
   coldsync/../gbtypes.h coldsync/pdb.h
-coldsync/util.o: coldsync/util.c coldsync/config.h coldsync/pconn/util.h \
+coldsync/util.o: coldsync/util.c coldsync/cs-config.h coldsync/pconn/util.h \
   coldsync/palm.h coldsync/../gbtypes.h
 jeeps/gpsapp.o: jeeps/gpsapp.c jeeps/gps.h jeeps/../defs.h \
   jeeps/../queue.h jeeps/../gbtypes.h jeeps/../cet.h jeeps/../cet_util.h \
diff --git a/gpsbabel/coldsync/config.h b/gpsbabel/coldsync/config.h
deleted file mode 100644 (file)
index 69eadd9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Assume we're on a conformant ISO C platform.
- */
-
-
-#define STDC_HEADERS 1
-#define _(str)        str
-#define inline 
diff --git a/gpsbabel/coldsync/cs-config.h b/gpsbabel/coldsync/cs-config.h
new file mode 100644 (file)
index 0000000..69eadd9
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Assume we're on a conformant ISO C platform.
+ */
+
+
+#define STDC_HEADERS 1
+#define _(str)        str
+#define inline 
index 27a35bef1250b3f0ca0e975c9c022535622af2f7..4a287bd445ed5d90749dd8cefe844bf7f5b15383 100644 (file)
@@ -6,7 +6,7 @@
  *     You may distribute this file under the terms of the Artistic
  *     License, as specified in the README file.
  *
- * $Id: pdb.c,v 1.9 2006-02-20 21:59:19 robertl Exp $
+ * $Id: pdb.c,v 1.10 2006-04-09 02:11:34 robertl Exp $
  */
 /* XXX - The way zero-length records are handled is a bit of a kludge. They
  * shouldn't normally exist, with the exception of expunged records. But,
@@ -22,7 +22,7 @@
  * Debugging messages should go to 'FILE *pdb_logfile'.
  */
 
-#include "config.h"
+#include "cs-config.h"
 #include <stdio.h>
 #include <fcntl.h>             /* For open() */
 #include <sys/types.h>
index 2d7031d3c7677f3a19ae7cea02a1acdb60a702e0..07430c3dcde8fec065132736414ddcfc6dbc41b1 100644 (file)
  * native format, convert them to Palm (big-endian) format, and write
  * them to a ubyte string.
  *
- * $Id: util.c,v 1.4 2005-03-18 03:56:35 robertl Exp $
+ * $Id: util.c,v 1.5 2006-04-09 02:11:34 robertl Exp $
  */
 
-#include "config.h"
+#include "cs-config.h"
 #include <stdio.h>
 #include <ctype.h>     /* For isprint() */
 #include <pconn/util.h>
index caa3e1fce79c67a11a3bab9295b290a27894b5fb..bd5ea3653f2d5adcd08cdf7a91e204b3b4ab1537 100755 (executable)
@@ -273,7 +273,7 @@ PACKAGE_VERSION='VERSION'
 PACKAGE_STRING='GPSBabel VERSION'
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS EXPAT_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE  LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS EXPAT_LIB LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -790,6 +790,11 @@ Fine tuning of the installation directories:
 _ACEOF
 
   cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
 _ACEOF
 fi
 
@@ -1260,6 +1265,114 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
           ac_config_headers="$ac_config_headers config.h"
 
 
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
 # Checks for programs.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2191,31 +2304,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f $ac_dir/shtool; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -2325,14 +2413,9 @@ echo "${ECHO_T}no" >&6
 fi
 
 
+
+
 # Checks for libraries.
-# FIXME: Replace `main' with a function in `-lBSDPClient':
-# AC_CHECK_LIB([BSDPClient], [main])
-# FIXME: Replace `main' with a function in `-lIOKit':
-# AC_CHECK_LIB([IOKit], [main])
-# FIXME: Replace `main' with a function in `-lexpat':
-# AC_CHECK_LIB([expat], [XML_ParserCreate])
-# FIXME: Replace `main' with a function in `-lm':
 
 
 echo "$as_me:$LINENO: checking for cos in -lm" >&5
@@ -2408,19 +2491,22 @@ _ACEOF
 
 fi
 
-# FIXME: Replace `main' with a function in `-lsetupapi':
-# AC_CHECK_LIB([setupapi], [main])
-# FIXME: Replace `main' with a function in `-lusb':
-# AC_CHECK_LIB([usb], [usb_open])
 
-echo "$as_me:$LINENO: checking for libusb" >&5
+
+case "$target" in
+    *-*-cygwin* | *-*-mingw32*)
+       OSJEEPS=jeeps/gpsusbwin.o
+       USB_LIBS=-lsetupapi
+       ;;
+    *)
+       echo "$as_me:$LINENO: checking for libusb" >&5
 echo $ECHO_N "checking for libusb... $ECHO_C" >&6
-if test "$with_libusb" = no ; then
-       echo "$as_me:$LINENO: result: check not done" >&5
+       if test "$with_libusb" = no ; then
+               echo "$as_me:$LINENO: result: check not done" >&5
 echo "${ECHO_T}check not done" >&6
-       OSJEEPS=jeeps/gpsusbstub.o
-else
-       # Extract the first word of "libusb-config", so it can be a program name with args.
+               OSJEEPS=jeeps/gpsusbstub.o
+       else
+               # Extract the first word of "libusb-config", so it can be a program name with args.
 set dummy libusb-config; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -2456,17 +2542,17 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
-       if test "$LIBUSBCONFIG" = false; then
-                       { { echo "$as_me:$LINENO: error: libusb-config not found in $PATH" >&5
+               if test "$LIBUSBCONFIG" = false; then
+                       { { echo "$as_me:$LINENO: error: libusb-config not found in $PATH" >&5
 echo "$as_me: error: libusb-config not found in $PATH" >&2;}
    { (exit 1); exit 1; }; }
-       fi;
-       OLDFLAGS=$LDFLAGS
-       OCFLAGS=$CFLAGS
-       LDFLAGS="$LDFLAGS `libusb-config --libs`"
-       CFLAGS="$OCFLAGS `libusb-config --cflags`"
+               fi;
+               OLDFLAGS=$LDFLAGS
+               OCFLAGS=$CFLAGS
+               LDFLAGS="$LDFLAGS `libusb-config --libs`"
+               CFLAGS="$OCFLAGS `libusb-config --cflags`"
 
-       echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
+               echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
 echo $ECHO_N "checking for usb_interrupt_read in -lusb... $ECHO_C" >&6
 if test "${ac_cv_lib_usb_usb_interrupt_read+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2536,8 +2622,8 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBUSB 1
 _ACEOF
 
-               USB_CFLAGS="`libusb-config --cflags`"
-               USB_LIBS="`libusb-config --libs`"
+                       USB_CFLAGS="`libusb-config --cflags`"
+                       USB_LIBS="`libusb-config --libs`"
 else
   { { echo "$as_me:$LINENO: error: libusb >= 0.1.8 is needed" >&5
 echo "$as_me: error: libusb >= 0.1.8 is needed" >&2;}
@@ -2545,10 +2631,12 @@ echo "$as_me: error: libusb >= 0.1.8 is needed" >&2;}
 
 fi
 
-       OSJEEPS=jeeps/gpslibusb.o
-       CFLAGS="$OCFLAGS"
-#      LIBS="$LIBS `libusb-config --libs`"
-fi
+               OSJEEPS=jeeps/gpslibusb.o
+               CFLAGS="$OCFLAGS"
+       #       LIBS="$LIBS `libusb-config --libs`"
+       fi
+    ;;
+esac
 
 
 
@@ -2778,11 +2866,9 @@ fi
 done
 
 
-#AC_CONFIG_FILES([Makefile
-#                 coldsync/Makefile
-#                 doc/Makefile
-#                 mingw/Makefile])
-          ac_config_files="$ac_config_files Makefile"
+# coldsync, shapelib, and jeeps  are here just so the target directories are
+# created.
+                                        ac_config_files="$ac_config_files Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3310,6 +3396,9 @@ do
   case "$ac_config_target" in
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "shapelib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shapelib/Makefile" ;;
+  "coldsync/Makefile" ) CONFIG_FILES="$CONFIG_FILES coldsync/Makefile" ;;
+  "jeeps/Makefile" ) CONFIG_FILES="$CONFIG_FILES jeeps/Makefile" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -3395,6 +3484,18 @@ s,@ECHO_C@,$ECHO_C,;t t
 s,@ECHO_N@,$ECHO_N,;t t
 s,@ECHO_T@,$ECHO_T,;t t
 s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@LDFLAGS@,$LDFLAGS,;t t
index a05a7545c52cf6d5a9956bb4c104314093304c58..25867419f4e1c15e4f0e8e1f358c4cc5b3f29a1d 100644 (file)
@@ -14,53 +14,45 @@ AC_CANONICAL_TARGET
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
+AC_EXEEXT
+AC_SUBST(AC_EXEEXT)
 
 # Checks for libraries.
-# FIXME: Replace `main' with a function in `-lBSDPClient':
-# AC_CHECK_LIB([BSDPClient], [main])
-# FIXME: Replace `main' with a function in `-lIOKit':
-# AC_CHECK_LIB([IOKit], [main])
-# FIXME: Replace `main' with a function in `-lexpat':
-# AC_CHECK_LIB([expat], [XML_ParserCreate])
-# FIXME: Replace `main' with a function in `-lm':
 AC_CHECK_LIB([m], [cos])
-# FIXME: Replace `main' with a function in `-lsetupapi':
-# AC_CHECK_LIB([setupapi], [main])
-# FIXME: Replace `main' with a function in `-lusb':
-# AC_CHECK_LIB([usb], [usb_open])
 
  
-    
-AC_MSG_CHECKING(for libusb)
-if test "$with_libusb" = no ; then
-       AC_MSG_RESULT(check not done)
-       case "$target" in
-           *-*-cygwin* | *-*-mingw32*)
-               OSJEEPS=jeeps/gpsusbwin.o
-               USB_LIBS=-lsetupapi;;
-           *)
+case "$target" in
+    *-*-cygwin* | *-*-mingw32*)
+       OSJEEPS=jeeps/gpsusbwin.o
+       USB_LIBS=-lsetupapi
+       ;;
+    *)
+       AC_MSG_CHECKING(for libusb)
+       if test "$with_libusb" = no ; then
+               AC_MSG_RESULT(check not done)
                OSJEEPS=jeeps/gpsusbstub.o
-       esac;
-else
-       AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
-       if test "$LIBUSBCONFIG" = false; then
-                       AC_MSG_ERROR([libusb-config not found in $PATH])
-       fi;
-       OLDFLAGS=$LDFLAGS
-       OCFLAGS=$CFLAGS
-       LDFLAGS="$LDFLAGS `libusb-config --libs`"
-       CFLAGS="$OCFLAGS `libusb-config --cflags`"
-
-       AC_CHECK_LIB([usb], [usb_interrupt_read],
-               AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
-               [USB_CFLAGS="`libusb-config --cflags`"]
-               [USB_LIBS="`libusb-config --libs`"],
-               [AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
-               )
-       OSJEEPS=jeeps/gpslibusb.o
-       CFLAGS="$OCFLAGS"
-#      LIBS="$LIBS `libusb-config --libs`"
-fi
+       else
+               AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
+               if test "$LIBUSBCONFIG" = false; then
+                       AC_MSG_ERROR([libusb-config not found in $PATH])
+               fi;
+               OLDFLAGS=$LDFLAGS
+               OCFLAGS=$CFLAGS
+               LDFLAGS="$LDFLAGS `libusb-config --libs`"
+               CFLAGS="$OCFLAGS `libusb-config --cflags`"
+
+               AC_CHECK_LIB([usb], [usb_interrupt_read],
+                       AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
+                       [USB_CFLAGS="`libusb-config --cflags`"]
+                       [USB_LIBS="`libusb-config --libs`"],
+                       [AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
+                       )
+               OSJEEPS=jeeps/gpslibusb.o
+               CFLAGS="$OCFLAGS"
+       #       LIBS="$LIBS `libusb-config --libs`"
+       fi
+    ;;
+esac
 
 AC_SUBST(USB_LIBS)
 AC_SUBST(USB_CFLAGS)
@@ -114,9 +106,7 @@ AC_SUBST(EXPAT_LIB)
 # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul])
 AC_CHECK_FUNCS([nanosleep sleep])
 
-#AC_CONFIG_FILES([Makefile
-#                 coldsync/Makefile
-#                 doc/Makefile
-#                 mingw/Makefile])
-AC_CONFIG_FILES([Makefile])
+# coldsync, shapelib, and jeeps  are here just so the target directories are
+# created.
+AC_CONFIG_FILES([Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile])
 AC_OUTPUT
index ccc07f35643fd2b5a1600036a266108d3317e429..0151720b90bb2fa9b799e1631b23a54d123efa2f 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <stdio.h>
 #include <ctype.h>
-#include "../config.h"
+#include "config.h"
 #if HAVE_LIBUSB
 #include <usb.h>
 #include "gps.h"